//
//  Signal.m
//  Portable Traffic Signal Assistor
//
//  Created by Hao Xu on 4/1/12.
//  Copyright (c) 2012 TTU. All rights reserved.
//

#import "Signal.h"

@implementation Signal

@synthesize signalID=_signalID;
@synthesize signalName=_signalName;
@synthesize cycleLength=_cycleLength;
@synthesize location=_location;
//@synthesize signalRingList=_signalRingList;
//@synthesize ring1=_ring1;
//@synthesize ring2=_ring2;
@synthesize ringList=_ringList;
@synthesize offset=_offset;
@synthesize offsetPhase=_offsetPhase;
@synthesize offsetBorE=_offsetBorE;
@synthesize parentAgencyID=_parentAgencyID;
@synthesize parentSubSystemID=_parentSubSystemID;
@synthesize parentTimingPatternID=_parentTimingPatternID;
//@synthesize coordinate=_coordinate;
- (id) init
{
    self=[super init];
    if(self)
    {
        self.ringList=[[[NSMutableArray alloc] init] autorelease];
        for (int i=0; i<[SMRTStaticConfiguration getMaximumRingNumber]; i++) {
            [self.ringList addObject:[[[SignalRing alloc] init] autorelease]];
        }
    }
    return self;
}
-(void) dealloc
{
    [_signalID release];
    [_signalName release];
    [_cycleLength release];
    [_location release];
//    [_signalRingList release];
//    [_ring1 release];
//    [_ring2 release];
    [_ringList release];
    [_offset release];
    [_offsetPhase release];
    [_offsetBorE release];
    [_parentAgencyID release];
    [_parentSubSystemID release];
    [_parentTimingPatternID release];
    [super dealloc];
}

@end
